﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;

namespace YXShop.Web.admin.systeminfo
{
    public partial class mouldinfo_list : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if(!this.Page.IsPostBack)
            {
                YXShop.Common.PromptInfo.Popedom("010006001");
                ChangeHope.WebPage.WebControl.SetDropDownList(this.w_d_MouldType, "id", "name", "yxs_mouldtype",true);
                string isStoreLabel = ChangeHope.WebPage.PageRequest.GetString("isStoreLabel");
                if (isStoreLabel != "")
                {
                    this.Link.NavigateUrl = "mouldinfo_edit.aspx?isStoreLabel=" + isStoreLabel;
                }
                GetList();
            }
        }



        private void GetList()
        {

            //获取列表
            BLL.SystemInfo.MouldInfo bll = new YXShop.BLL.SystemInfo.MouldInfo();
            string action = ChangeHope.WebPage.PageRequest.GetQueryString("action");
            int id = ChangeHope.WebPage.PageRequest.GetQueryInt("id");
            if (id > 0 && action.Equals("del"))
            {
                YXShop.Common.PromptInfo.Popedom("010006003", "对不起，您没有权限进行删除");
                bll.Delete(id);
            }
            this.Literal1.Text = bll.GetList();
            bll = null;
        }

        protected void LinkButton1_Click(object sender, EventArgs e)
        {
            GetList();
        }
    }
}
